import cv2

image = cv2.imread("opencv_logo.jpg")
image2 = cv2.imread("logo.png")

# cv2.imshow("blue", image[:, :, 0])
# cv2.imshow("green", image[:, :, 1])
# cv2.imshow("red", image[:, :, 2])

# 三原色的平均，类似彩色电视剧用黑白电视播放的效果
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
cv2.imshow("gray", gray)

gray2 = cv2.cvtColor(image2, cv2.COLOR_RGB2GRAY)
cv2.imshow("gray2", gray2)

cv2.waitKey()
